// vite.config.ts
import path from "node:path";
import react from "file:///Users/anviz/gitee/react-admin/node_modules/.pnpm/@vitejs+plugin-react@4.3.3_vite@5.4.11_@types+node@20.5.1_sass@1.81.0_terser@5.36.0_/node_modules/@vitejs/plugin-react/dist/index.mjs";
import { visualizer } from "file:///Users/anviz/gitee/react-admin/node_modules/.pnpm/rollup-plugin-visualizer@5.12.0_rollup@4.27.0/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
import { defineConfig, loadEnv } from "file:///Users/anviz/gitee/react-admin/node_modules/.pnpm/vite@5.4.11_@types+node@20.5.1_sass@1.81.0_terser@5.36.0/node_modules/vite/dist/node/index.js";
import { createSvgIconsPlugin } from "file:///Users/anviz/gitee/react-admin/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.4.11_@types+node@20.5.1_sass@1.81.0_terser@5.36.0_/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import tsconfigPaths from "file:///Users/anviz/gitee/react-admin/node_modules/.pnpm/vite-tsconfig-paths@5.1.2_typescript@5.6.3_vite@5.4.11_@types+node@20.5.1_sass@1.81.0_terser@5.36.0_/node_modules/vite-tsconfig-paths/dist/index.js";
var vite_config_default = defineConfig(({ mode }) => {
  const env = loadEnv(mode, process.cwd(), "");
  const base = env.VITE_APP_BASE_PATH || "/";
  const isProduction = mode === "production";
  return {
    base,
    plugins: [
      react(),
      tsconfigPaths(),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        symbolId: "icon-[dir]-[name]"
      }),
      isProduction && visualizer({
        open: true,
        gzipSize: true,
        brotliSize: true
      })
    ],
    server: {
      open: true,
      host: true,
      port: 3001,
      proxy: {
        "/adminapi": {
          target: "https://www.chuangmeng888.com",
          changeOrigin: true,
          rewrite: (path2) => path2.replace(/^\/adminapi/, "/adminapi"),
          secure: false,
          ws: true
        }
      }
    },
    optimizeDeps: {
      include: ["react", "react-dom", "react-router", "antd"]
    },
    esbuild: {
      drop: isProduction ? ["console", "debugger"] : []
    },
    build: {
      target: "esnext",
      minify: "esbuild",
      sourcemap: false,
      cssCodeSplit: true,
      chunkSizeWarningLimit: 1e3,
      // 提高警告阈值到 1000 KB
      rollupOptions: {
        output: {
          manualChunks: {
            "vendor-react": ["react", "react-dom", "react-router"],
            "vendor-antd": ["antd", "@ant-design/icons", "@ant-design/cssinjs"],
            "vendor-charts": ["apexcharts", "react-apexcharts"],
            "vendor-utils": ["axios", "dayjs", "i18next", "zustand"],
            "vendor-ui": [
              "framer-motion",
              "styled-components",
              "@iconify/react"
            ]
          }
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvYW52aXovZ2l0ZWUvcmVhY3QtYWRtaW5cIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIi9Vc2Vycy9hbnZpei9naXRlZS9yZWFjdC1hZG1pbi92aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vVXNlcnMvYW52aXovZ2l0ZWUvcmVhY3QtYWRtaW4vdml0ZS5jb25maWcudHNcIjtpbXBvcnQgcGF0aCBmcm9tIFwibm9kZTpwYXRoXCI7XG5cbmltcG9ydCByZWFjdCBmcm9tIFwiQHZpdGVqcy9wbHVnaW4tcmVhY3RcIjtcbmltcG9ydCB7IHZpc3VhbGl6ZXIgfSBmcm9tIFwicm9sbHVwLXBsdWdpbi12aXN1YWxpemVyXCI7XG5pbXBvcnQgeyBkZWZpbmVDb25maWcsIGxvYWRFbnYgfSBmcm9tIFwidml0ZVwiO1xuaW1wb3J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